<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script> 
    for (let i=0 ; i<=20; i++){
        console.log(i)
    }
   
    let i = 1
    let sum = 0
    while(i <= 1000) {
        sum += i
        i++
    }
    console.log(sum)

    for (let i=100; i<=200; i++){
        if(i % 6 ===0){
            console.log(i)
        }
    }

        // 4
    let num = +prompt('请输入一个数')
      let num1 = 0
      for (let i = 1; i <= num; i++) {
        num1 += i
      }
      alert(num1)
    </script>
</body>
</html>